package springboot.file.demo.util;

/**
 * @Author: jxm
 * @Description:
 * @Date: 2022/4/28 10:00
 * @Version: 1.0
 */
public class TestUtil {

    public static void main(String[] args) {
        String imgUrl = "http://127.0.0.1:8080/cms/ReadAddress/1479805098158.jpg";
        String image = imgUrl.substring(imgUrl.lastIndexOf("/")+1);
        System.out.println(image);
        String fileName = image.substring(image.lastIndexOf("\\") + 1);
        System.out.println(fileName);
    }
}
